import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// 安装fundebug-javascript与fundebug-vue
import * as fundebug from "fundebug-javascript";
import FundebugVue from "fundebug-vue";
fundebug.apikey = "e520c1df9fca7c383e46b363a1f4113125d7883784368e2e56fc864d89375b22"
new FundebugVue(fundebug).installVueErrorHandler(Vue); // Vue 2.x 
// createApp(App).use(new FundebugVue(fundebug)).x.x.mount("#app"); // Vue 3.x


// 引入three
import * as Three from 'three';
// 引入three轨道控制器
import {
	OrbitControls
} from 'three/examples/jsm/controls/OrbitControls'

// 全局弹窗组件
import dialog from "@/components/dialog";
Vue.component('my-dialog', dialog)

// 引入右键菜单
// 文档说明 https://blog.csdn.net/ZMJ_QQ/article/details/126875041
import Contextmenu from "vue-contextmenujs"
Vue.use(Contextmenu);

//挂载到原型
Vue.prototype.$Three = Three;
Vue.prototype.$OrbitControls = OrbitControls;

Vue.use(ElementUI);
Vue.config.productionTip = false
//时间戳转换方法(年月日)    date:时间戳数字
Vue.prototype.$formatDate = (e) => {
	var date = e ? new Date(e) : new Date();
	var YY = date.getFullYear() + '-';
	var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
	var DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
	return YY + MM + DD;
}
new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')